let defaultValue = {
  userInfo: null,
  cartTotal: 0,
};

export default {
  namespaced: true,
  state: {
    ...defaultValue
  },
  mutations: {
    modifyUserInfo(state, payload) {
      state.userInfo = payload.userInfo
      state.cartTotal = payload.cartTotal
    },

    clearUserInfo(state) {
      state = {
        ...defaultValue
      };
    }
  }
}